{
 "cells": [
  {
   "cell_type": "code",
   "id": "initial_id",
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2025-10-28T05:12:15.481485Z",
     "start_time": "2025-10-28T05:12:15.478465Z"
    }
   },
   "source": [
    "# 定义列表\n",
    "list1 = [1, 2, 3, 4, 5]\n",
    "print(list1)\n",
    "#定义一个10个元素的数组\n",
    "list2 = [i for i in range(10)]\n",
    "print(list2)\n"
   ],
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1, 2, 3, 4, 5]\n",
      "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n"
     ]
    }
   ],
   "execution_count": 2
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-10-28T05:12:15.645672Z",
     "start_time": "2025-10-28T05:12:15.643710Z"
    }
   },
   "cell_type": "code",
   "source": "print(1)",
   "id": "a03c2b163f0d4f67",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n"
     ]
    }
   ],
   "execution_count": 3
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-10-28T05:51:17.919578Z",
     "start_time": "2025-10-28T05:51:17.916482Z"
    }
   },
   "cell_type": "code",
   "source": [
    "# 定义列表\n",
    "list1 = [1, 2, 3, 4, 5, 6, 7, 8, 9]\n",
    "list1[1:7:]"
   ],
   "id": "a1fe66c3f696d97a",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[2, 3, 4, 5, 6, 7]"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 13
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-10-28T05:51:47.065161Z",
     "start_time": "2025-10-28T05:51:47.062359Z"
    }
   },
   "cell_type": "code",
   "source": "list1[6:0:-1]",
   "id": "a8658d490b9c8f1f",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[7, 6, 5, 4, 3, 2]"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 17
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
